package routers

import "github.com/gin-gonic/gin"

func LoadResp(engine *gin.Engine) {
	engine.GET("/someStruct", func(ctx *gin.Context) {
		var msg struct {
			Name    string
			Message string
			Number  int
		}
		msg.Name = "yzp"
		msg.Message = "this is a message"
		msg.Number = int(90)
		ctx.JSON(200, msg)
	})
	engine.GET("someXml", func(ctx *gin.Context) {
		ctx.XML(200, gin.H{"msg": "abc"})
	})
	engine.GET("someYaml", func(ctx *gin.Context) {
		ctx.YAML(200, gin.H{"msg": "张三"})
	})

	//engine.GET("someProtoBuf", func(ctx *gin.Context) {
	//	resp := []int64{int64(2), int64(3)}
	//	label := "label"
	//	&re
	//})
}
